package org.example;

import org.testng.annotations.*;

public class BasicAnnotation {
    @Test
    public void testCase1(){
        System.out.printf("Thread id:%s%n",Thread.currentThread().getId());
        System.out.println("测试用例testCase1");
    }
    @Test
    public void testCase2(){
        System.out.printf("Thread id:%s%n",Thread.currentThread().getId());
        System.out.println("测试用例testCase2");
    }
    @BeforeMethod
    public void beforeMethod(){

        System.out.println("beforeMethod方法前执行");
    }
    @AfterMethod
    public void afterMethod(){
        System.out.println("afterMethod方法后执行");
    }

    @BeforeClass
    public void beforeClass(){
        System.out.println("BeforeClass之前执行");
    }
    @AfterClass
    public void afterClass(){
        System.out.println("AfterClass之前执行");
    }

    @BeforeSuite
    public void beforeSuite(){
        System.out.println("BeforeSuite在类之前执行");
    }
    @AfterSuite
    public void afterSuite(){
        System.out.println("afterSuite在类之后执行");
    }
}
